package com.dzb.langchain4j.enums;

/**
 * 录取状态枚举
 */
public enum AdmissionStatusEnum {
    
    ADMITTED(1, "已录取"),
    SUCCESSFUL_APPLICATION(2, "投档成功"),
    SLIDING(3, "滑档"),
    WITHDRAWN(4, "退档"),
    UNKNOWN(5, "未知");
    
    private final Integer code;
    private final String description;
    
    AdmissionStatusEnum(Integer code, String description) {
        this.code = code;
        this.description = description;
    }
    
    public Integer getCode() {
        return code;
    }
    
    public String getDescription() {
        return description;
    }
    
    /**
     * 根据状态码获取枚举
     */
    public static AdmissionStatusEnum getByCode(Integer code) {
        if (code == null) {
            return UNKNOWN;
        }
        for (AdmissionStatusEnum status : values()) {
            if (status.getCode().equals(code)) {
                return status;
            }
        }
        return UNKNOWN;
    }
    
    /**
     * 根据状态码获取描述
     */
    public static String getDescriptionByCode(Integer code) {
        return getByCode(code).getDescription();
    }
} 